// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import { previewSvg } from './handleSvg'
import { createFile } from './handleCreateFile'

export function activate(context: vscode.ExtensionContext) {

	const createVue2Command = vscode.commands.registerCommand('createVue2', (uri: vscode.Uri) => {
		createFile(uri.path, 'vue2');
		vscode.window.showInformationMessage('创建成功');
	})
	const createVue3Command = vscode.commands.registerCommand('createVue3', (uri: vscode.Uri) => {
		createFile(uri.path, 'vue3');
		vscode.window.showInformationMessage('创建成功');
	})
	const previewSvgCommand = vscode.commands.registerCommand('svg-viewer.previewsvg', (uri: vscode.Uri) => {
		previewSvg(uri.path);
	})
	context.subscriptions.push(createVue2Command);
	context.subscriptions.push(createVue3Command);
	context.subscriptions.push(previewSvgCommand);
}


// This method is called when your extension is deactivated
export function deactivate() { }
